

<?php 
    if($template->get('aProduct')){$aProduct = $template->get('aProduct'); ?>
        <div class="item default_product_layout <?php echo (isset($aProduct['isHightLight']) ? 'item_hightlight' : ''); ?>" val="<?php echo $aProduct['uri']; ?>">
            <div class="item_swap">
                <div class="item_content">
                    <div>
                        <div class="image_content">
                            <img src="<?php echo URL::getLink('upload/'.$aProduct['image']); ?>" alt="">
                        </div>
                        <div class="item_info">
                            <p><?php if(strlen($aProduct['name']) > 20){echo substr($aProduct['name'],0,20).' ...';}else{ echo $aProduct['name'];} ?></p>
                            <p>Gia <?php echo $aProduct['price']; ?> VND</p>
                        </div>
                    </div>
                    <div class="item_info_panel">
                        <h3><?php if(strlen($aProduct['name']) > 20){echo substr($aProduct['name'],0,20).' ...';}else{ echo $aProduct['name'];} ?></h3>
                        <p>Dang boi <strong><?php echo $aProduct['ownUser']; ?></strong></p>
                        <p><?php if(strlen($aProduct['description']) > 170){echo substr($aProduct['description'],0,170).' ...';}else{ echo $aProduct['description'];} ?></p>
                        <div style="clear: both;text-align: center;">
                            <?php $aArr = explode("/" , $aProduct['uri']);$sId = $aArr[count($aArr)-1]; ?>
                            <a href="<?php echo $aProduct['uri']; ?>" val="<?php echo URL::getShortLink('product','detail',$sId); ?>" class="link_button">CHI TIET</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="hightlight"></div>
            <?php echo ($template->get('title') ? '<div class="item_title">'. $template->get('title').'</div>' : ''); ?>
        </div>
<?php }?>